From: Roger Pau Monné Date: Fri, 17 Aug 2018 11:54:02 +0000 (+0200) Subject: dom0/pvh: change the order of the MMCFG initialization X-Git-Tag: archive/raspbian/4.14.0+80-gd101b417b7-1+rpi1^2~63^2~3453 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=4830902b043f2a28d18bf611c5f9112cf885dd30;p=xen.git dom0/pvh: change the order of the MMCFG initialization So it's done before the iommu is initialized. This is required in order to be able to fetch the MMCFG regions from the domain struct. No functional change. Signed-off-by: Roger Pau Monné Acked-by: Jan Beulich --- diff --git a/xen/arch/x86/hvm/dom0_build.c b/xen/arch/x86/hvm/dom0_build.c index f0cd63b1ec..5065729106 100644 --- a/xen/arch/x86/hvm/dom0_build.c +++ b/xen/arch/x86/hvm/dom0_build.c @@ -1100,6 +1100,13 @@ int __init dom0_construct_pvh(struct domain *d, const module_t *image, return rc; } + /* + * NB: MMCFG initialization needs to be performed before iommu + * initialization so the iommu code can fetch the MMCFG regions used by the + * domain. + */ + pvh_setup_mmcfg(d); + iommu_hwdom_init(d); rc = pvh_load_kernel(d, image, image_headroom, initrd, bootstrap_map(image), @@ -1124,8 +1131,6 @@ int __init dom0_construct_pvh(struct domain *d, const module_t *image, return rc; } - pvh_setup_mmcfg(d); - printk("WARNING: PVH is an experimental mode with limited functionality\n"); return 0; }